{extend name="layout/layout" /}

{block name="pagecss"}
<link href="__STATIC__/admin/pages/css/distRule.css" rel="stylesheet" type="text/css" />
<link href="__STATIC__/admin/css/components.css" rel="stylesheet" type="text/css" />

<link href="__STATIC__/common/uploadify/uploadify.css" rel="stylesheet" type="text/css" />
{/block}

{block name="content"}
<div class="row">
    <div class="col-xs-12">
        <div class="box box-success">
            <div class="box-body distRule">
                <form class="form-horizontal" id="modal_new_role" method="post">
                    <div class="form-body">
                        <div class="form-group">
                            <label class="col-lg-2 control-label"> <span class="required"> * </span>推广佣金比例:
                            </label>
                            <div class="col-lg-8">
                                <label class="form-control-static pull-left margin-left">下级订单实际成交金额的 </label>
                                <div class="col-lg-2 col-xs-11">
                                    <input type="text" class="form-control" name="value1" maxlength="5" value="{$sale.value1}">
                                </div>
                                <span class="form-control-static pull-left"> %</span>
                            </div>
                            <div class="col-lg-8">
                                <div class="col-xs-11 shuoming_info">
                                佣金说明：<br/>
                                佣金=每笔订单的实际成交金额（运费除外）× 佣金比例<br/>
                                订单生成后的售后问题由商家自理，交易完成后发生的维权退款不影响已结算的佣金。<br/>
                                分销员在店内自购商品、分享给自己然后下单均无法获得佣金。
                                </div>
                            </div>
                        </div>

                        <div class="form-group">
                            <label class="col-lg-2 control-label"> <span class="required"> * </span>最低提现金额:
                            </label>
                            <div class="col-lg-8">
                                <div class="col-lg-2 col-xs-11">
                                    <input type="text" class="form-control" name="value2" maxlength="6" value="{$sale.value2}">
                                </div>
                                <span class="form-control-static pull-left"> 元</span>
                            </div>
                            <div class="col-lg-8">
                                <div class="col-xs-11 shuoming_info">
                                    提现说明：<br/>
                                    每次最低提现金额不得少于最低提现金额。<br/>
                                    未提现佣金余额若少于最低提现金额，则无法申请提现。
                                </div>
                            </div>
                        </div>

                        <div class="form-group">
                            <label class="col-lg-2 control-label"> <span class="required"> * </span>预计到账时间:
                            </label>
                            <div class="col-lg-8">
                                <div class="col-lg-4">
                                    <!--  value="${memCoupon?.endTime" -->
                                    <input type="text" class="form-control" min="0" maxlength="5" name="expIntoDateStr" placeholder="建议15个工作日" value="{$sale.expIntoDateStr}">
                                </div>
                                <span class="form-control-static pull-left"> 个工作日</span>
                            </div>
                            <div class="col-lg-8">
                                <div class="col-xs-11 shuoming_info">
                                    到账说明：<br/>
                                    在到账时间范围内（以被分销人完成订单时间开始计算），未发生售后退款则预计收益转为实际收益
                                </div>
                            </div>
                        </div>

                        <div class="form-group">
                            <label class="col-lg-2 control-label"> <span class="required"> * </span>推广二维码封面:
                            </label>
                            <div class="col-lg-8">
                                <div class="col-lg-4">
                                    <input id="file_upload" style="height: 39px" type="file" class="form-control" min="0" multiple="true" maxlength="5"  value="">
                                    {if condition="$sale.qrcodeimg==''"}
                                    <img style="display: none;" id="upload_org_code_img" width="200" height="250" src="">
                                    {else /}
                                    <img id="upload_org_code_img" width="200" height="250" src="/public/upload/{$sale.qrcodeimg}">
                                    {/if}
                                    <input id="file_upload_image" name="qrcodeimg" type="hidden" multiple="true" value="">
                                </div>

                            </div>
                            <div class="col-lg-8">
                                <div class="col-xs-11 shuoming_info">

                                </div>
                            </div>
                        </div>

                        <input type="hidden" name="id" value='{$sale.id}'>

                        <hr />
                        <div class="form-actions">
                            <label class="col-md-3 control-label"></label>
                            <div class="col-md-9">
                                <button type="button" class="btn btn-primary" id="save" data-url="{:url('admin/sale/index')}"><i class="fa fa-check"></i> 保存</button>
                                <span class="help-block "></span>
                            </div>
                        </div>
                    </div>
                </form>
            </div>
        </div>
    </div>
</div>
{/block}

{block name="pagescript"}
<script>
    swf = '__STATIC__/common/uploadify/uploadify.swf';
    image_upload_url = "{:url('/admin/Uploadfile/upload')}";
</script>
<script src="__STATIC__/admin/js/include.js" type="text/javascript"></script>
<script src="__STATIC__/admin/pages/js/distRule.js" type="text/javascript"></script>
<script src="__STATIC__/common/uploadify/jquery.uploadify.min.js" type="text/javascript"></script>
<script src="__STATIC__/common/js/image.js" type="text/javascript"></script>
{/block}